package com.bingo.mpa.pojo;

import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;
import org.express.portal.persist.POJO;

public class Store extends POJO
{
	private static final long serialVersionUID = 1L;
	private long sid;
	private long aid;
	private String name;
	private String fullname;
	private String address;
	private String manager;
	private String phone;
	private String mobile;
	public Store()
	{
		super._this_table_name = "P_STORE";
	}
	public long getSid()
	{
		return sid;
	}
	public void setSid(long sid)
	{
		this.sid = sid;
	}
	public long getAid()
	{
		return aid;
	}
	public void setAid(long aid)
	{
		this.aid = aid;
	}
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public String getFullname()
	{
		return fullname;
	}
	public void setFullname(String fullname)
	{
		this.fullname = fullname;
	}
	public String getAddress()
	{
		return address;
	}
	public void setAddress(String address)
	{
		this.address = address;
	}
	public String getManager()
	{
		return manager;
	}
	public void setManager(String manager)
	{
		this.manager = manager;
	}
	public String getPhone()
	{
		return phone;
	}
	public void setPhone(String phone)
	{
		this.phone = phone;
	}
	public String getMobile()
	{
		return mobile;
	}
	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}
	@SuppressWarnings("unchecked")
	protected Map<String, Object> listInsertableFields()
	{
		try
		{
			Map<String, Object> props = BeanUtils.describe(this);
			if (getId() <= 0)
			{
				if(props.containsKey("id"))
				{
					props.remove("id");
				}
				if(props.containsKey("sid"))
				{
					props.remove("sid");
				}
			}
			props.remove("class");
			return props;
		}
		catch (Exception e)
		{
			throw new RuntimeException("Exception when Fetching fields of " + this);
		}
	}
}
